package top.bugger168.base.exception;

/**
 * 在线课堂统一异常类
 *
 * @author wanghaidong
 * @date 2023/08/28
 */
public class CourseOnlineException extends RuntimeException{
    private String errMessage;

    public CourseOnlineException() {
        super();
    }

    public CourseOnlineException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage(){
        return errMessage;
    }

    public static void cast(CommonError commonError){
        throw new CourseOnlineException(commonError.getErrMessage());
    }
    public static void cast(String errMessage){
        throw new CourseOnlineException(errMessage);
    }
}
